SymbolMarginSummaryV5
SymbolMarginSummary records are published by the AggRiskServers and consumed by execution engines
METADATA
Attribute | Value |
---|---|
Topic | 4740-risk-v5 |
MLink Token | ClientRisk |
Product | SRRisk |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
ticker_at | enum - AssetType | PRI | 'None' | stock ticker eg MSFT SPY |
ticker_ts | enum - TickerSrc | PRI | 'None' | stock ticker eg MSFT SPY |
ticker_tk | VARCHAR(12) | PRI | '' | stock ticker eg MSFT SPY |
accnt | VARCHAR(16) | PRI | '' | SRAccnt SR assignedup to 16 chars |
tradeDate | DATE | PRI | '1900-01-01' | current live period trading date |
clientFirm | VARCHAR(16) | PRI | '' | SR assigned client firm |
stkPos | INT | 0 | ||
futPos | INT | 0 | ||
optPos | INT | 0 | ||
marginUDnVDn | FLOAT | 0 | Margin uPrc Dn Vol Dn | |
marginUDnVUp | FLOAT | 0 | Margin uPrc Dn Vol Up | |
marginUUpVDn | FLOAT | 0 | Margin uPrc Up Vol Dn | |
marginUUpVUp | FLOAT | 0 | Margin uPrc Up Vol Up | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
ticker_tk | 1 |
ticker_at | 2 |
ticker_ts | 3 |
accnt | 4 |
tradeDate | 5 |
clientFirm | 6 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRRisk`.`MsgSymbolMarginSummaryV5` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'stock ticker (eg MSFT, SPY)',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'stock ticker (eg MSFT, SPY)',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'stock ticker (eg MSFT, SPY)',
`accnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SRAccnt (SR assigned;up to 16 chars)',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01' COMMENT 'current [live] period trading date',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR assigned client firm',
`stkPos` INT NOT NULL DEFAULT 0,
`futPos` INT NOT NULL DEFAULT 0,
`optPos` INT NOT NULL DEFAULT 0,
`marginUDnVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'Margin: uPrc Dn / Vol Dn',
`marginUDnVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'Margin: uPrc Dn / Vol Up',
`marginUUpVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'Margin: uPrc Up / Vol Dn',
`marginUUpVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'Margin: uPrc Up / Vol Up',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`accnt`,`tradeDate`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='SymbolMarginSummary records are published by the AggRiskServers and consumed by execution engines';
SELECT TABLE EXAMPLE QUERY
SELECT
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`accnt`,
`tradeDate`,
`clientFirm`,
`stkPos`,
`futPos`,
`optPos`,
`marginUDnVDn`,
`marginUDnVUp`,
`marginUUpVDn`,
`marginUUpVUp`,
`timestamp`
FROM `SRRisk`.`MsgSymbolMarginSummaryV5`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a DATE */
`tradeDate` = '2022-01-01'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
Doc Columns Query
SELECT * FROM SRRisk.doccolumns WHERE TABLE_NAME='SymbolMarginSummaryV5' ORDER BY ordinal_position ASC;